<%@ Page Language="C#" MasterPageFile="~/DoctorForum.Master" AutoEventWireup="true" Codebehind="AllForum.aspx.cs" Inherits="WebForum.AllForum" Title="Doctor Forum" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="ObjectDataSource1">
        <ItemTemplate>
            <asp:HiddenField ID="HiddenFieldIDParentForum" Value='<%# DataBinder.Eval(Container.DataItem,"Id") %>' runat="server" />
            <div>
                <div class="forumTitle">
                    <asp:HyperLink ID="HyperLinkSubForum" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Title").ToString().ToUpper() %>' NavigateUrl='<%#"ViewForum.aspx?id="+Eval("Id")%>' CssClass="Title"></asp:HyperLink>
                    -
                    <asp:Label ID="LabelParentForumTitle" CssClass="Desc" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Desc")%>'></asp:Label>
                </div>
                <div class="forumContent">
                    <%--<asp:Label ID="LabelParentForumTitle" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Title") %>'></asp:Label>--%>
                    <%--SubForum--%>
                    <asp:Repeater ID="Repeater2" runat="server" DataSourceID="ObjectDataSource2">
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLinkSubForum" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Title").ToString().ToUpper() %>' NavigateUrl='<%#"ViewSubForum.aspx?id="+Eval("Id")%>' CssClass="Title"></asp:HyperLink>
                            -
                            <asp:Label ID="LabelSubForumTitle" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Desc") %>'></asp:Label><br />
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
            </div>
            <%--DataSource For 5 SubForum--%>
            <asp:ObjectDataSource ID="ObjectDataSource2" TypeName="WebForum.App_Data.ForumDataSource" SelectMethod="List" runat="server">
                <SelectParameters>
                    <asp:ControlParameter Name="pId" PropertyName="Value" Type="Int32" ControlID="HiddenFieldIDParentForum"></asp:ControlParameter>
                    <asp:Parameter DefaultValue="5" Name="num" Type="Int32" />
                </SelectParameters>
            </asp:ObjectDataSource>
        </ItemTemplate>
    </asp:Repeater>
    <%--DataSource For All Forum--%>
    <asp:ObjectDataSource ID="ObjectDataSource1" TypeName="WebForum.App_Data.ForumDataSource" SelectMethod="List" runat="server"></asp:ObjectDataSource>
</asp:Content>
